package com.hu.web.servlet;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

public class SeventhServlet extends HttpServlet {

    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        System.out.println("SeventhServlet 的 doGet 方法执行");

        String id = request.getParameter("id");
        String name = request.getParameter("name");
        System.out.println("SeventhServlet: id=" + id + ",name=" + name);
        Object requestMsg = request.getAttribute("requestMsg");
        System.out.println("requestMsg: " + requestMsg);
    }

    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
    }

}
